package com.hex.liyue.messagemodule.presenter;


import com.hex.liyue.commonmodule.manager.HttpManager;
import com.hex.liyue.commonmodule.net.ResponseListener;
import com.hex.liyue.commonmodule.utils.L;
import com.hex.liyue.messagemodule.bean.SystemMsgResultBean;

/**
 * Created by yukuo on 2016/5/16.
 */
public class SystemMessagePresenter {
    private ISystemMessageView miSystemMessageView;

    public void getDataList(int page,int page_num) {
        long data = System.currentTimeMillis() / 1000;
        HttpManager.getInstance().getSystemMsg(page,page_num, new ResponseListener<SystemMsgResultBean>() {
            @Override
            public void onSuccess(SystemMsgResultBean systemMsgResultBean) {
                L.e("systemMsgResultBean",systemMsgResultBean.toString());
                miSystemMessageView.showLayoutContent();
                miSystemMessageView.setAdapter(systemMsgResultBean);
            }

            @Override
            public void onFailure(String responseresult) {
                L.e("systemMsgResultBean11","21111111111111111");

                miSystemMessageView.showLayoutContent();
                miSystemMessageView.setAdapter(null);
            }
        });
    }

    public SystemMessagePresenter(ISystemMessageView iSystemMessageView) {
        miSystemMessageView = iSystemMessageView;
    }
}
